package com.company;

import jxl.read.biff.BiffException;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;

public class Main {

    public static void main(String[] args) throws IOException, BiffException {
	// write your code here

        Reduce im=new Reduce("src/bbb.xls",3);

        ArrayList<ArrayList<Double>> orderArrayLists=im.orderProduce();

        File file=new File("src/a"+4+".txt");
        file.createNewFile();

        PrintWriter output=new PrintWriter(file);
        for (int i=0;i<orderArrayLists.size();i++){
            for (int j=0;j<orderArrayLists.get(i).size();j++){
                output.print(orderArrayLists.get(i).get(j)+" ");
            }
            output.println();
        }
        output.close();
    }
}
